//
//  SelectCityCollectionViewCell.m
//  JJHW_coreData
//
//  Created by lizhenqiang on 16/4/16.
//  Copyright © 2016年 HFKJ_LZQ. All rights reserved.
//

#import "SelectCityCollectionViewCell.h"

@implementation SelectCityCollectionViewCell


-(void)setCellData:(CityObj *)obj
{
    CGFloat width = (DeviceWidth-25)/2;
    CGFloat height = width*(120/175.0);
    NSString *pic = [NSString stringWithFormat:@"%@_%dx%d.jpg",obj.cover,(int)width,(int)height];
    self.bgImageView.contentMode = UIViewContentModeScaleAspectFill;
    [self.bgImageView sd_setImageWithURL:[NSURL URLWithString:pic] placeholderImage:kplaceholderImage130];
    self.cityNameLabel.text = obj.name;
}

- (void)awakeFromNib {
    // Initialization code
    self.bgImageView.contentMode = UIViewContentModeScaleAspectFill;
}

@end
